<template>
	<view class="operate">
		<view class="operate-content">
			<!-- 			<view class="operate-content-item">
				<image class="img-box" @tap="previewImage"  :data-url="item" :data-urls="product.pics.join(',')" src="https://heda123.oss-cn-guangzhou.aliyuncs.com/upload/3/20250122/e173b9736cb1ca7e5ac4801be6cc484d.jpg" mode="widthFix"></image>
			</view> -->
			<block v-for="(item, index) in pic" :key="index">
				<view class="swiper-item-view">
					<image class="img-box" :src="item" mode="widthFix" @tap="previewImage" :data-url="item"
						:data-urls="pic.join(',')" />
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	var app = getApp();
	export default {
		data() {
			return {
				opt: {},
				pic: [],
				longitude: '',
				latitude: '',
				mendian_id: 0,
			}
		},
		onLoad(opt) {
			this.opt = app.getopts(opt);
			this.getdata()
		},
		methods: {
			getdata: function() {
				var that = this;
				app.get('Shop/product', {
					id: that.opt.id,
					longitude: that.longitude,
					latitude: that.latitude,
					mendian_id: that.mendian_id
				}, function(res) {

					if (res.status == 1) {
						that.pic = res.product.certificate_images
					} else {
						app.error(res.msg)
					}
				});
			},
		}
	}
</script>

<style scoped>
	.operate {
		padding: 20rpx;
	}

	.operate-content {
		background-color: #fff;
		border-radius: 20rpx;
		padding: 20rpx;
	}

	.img-box {
		width: 100%;
	}
	.swiper-item-view{
		margin-bottom: 10rpx;
	}
</style>